/*

Author:Vishwajeet Dusane
*/

#include<stdio.h>
#include<math.h>
#include<iostream.h>

class Maths
{
public:
 int sign,n;
 Maths()
 { //cout.precision(9);
      
   
Cos
 return 0;
}
  sign=-1; 
 
 } 
 int invertSign(int sign)
 {
   if(sign==1)
    return -1;
   else
     //cout.precision(9);
    return 1;
    
   
 }
 long double getPower(float x,int n)
 {Cos
  return pow(x,n);  
 }     
   

 return 0;
}
 
 long double getFact(int n)
 {
   long double fact;
   fact=1;
   
   for(int i=1;i<=n;i++)
    {
   

 return 0;
}
      fact=fact*i;
   

 return 0;
}
    } 
   return fact;
 }
};


class Sin:public Maths
{
 public:
 long double series;
  

	void  SinPowerSeries(float x)
	
	{
	   //x power / factorial
	   long double fact;
	   series=1;
	   n=2; 
	   sign=1;
	    for(int i=0;i<30;i++)
	    {   
	       fact=getFact(n); 
	       sign=invertSign(sign);  
	        
	       series=series+((sign)*(getPower(x,n)/fact));
	      
	       n=n+2;  
	 //cout.precision(9);
           } 
   

 return 0;
}
	 cout<<"\nPower series :"<<series;     
	}
 
};


int main()
{

Sin C;




        for(float i=0.1;i<10;i=i+0.2)
	{
	C.SinPowerSeries(i);
	cout<<"Actual Sin ="<<Sin(i);   
	}


   

 return 0;
}
